package com.rao.controller;

import com.rao.bo.MovieUserBo;
import com.rao.service.MovieUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@Controller
public class IndexController {

    @Autowired
    MovieUserService movieUserService;

    @RequestMapping(value = "index", method = RequestMethod.GET)
    public String index(Model model) {
        List<MovieUserBo> list = movieUserService.getAllMovieUser();
        model.addAttribute("data",list);
        return "index";
    }



}
